import path from 'path';

export const getLessOptions = ({ mode, command }: { mode: string; command: string }) => {
  const lessOptions = {
    modifyVars: {
      hack: `true; @import "${path.resolve('src/assets/css/var.less')}";`,
      // 勿删, antd样式前缀
      '@ant-prefix': 'ant',
      '@animation-duration-slow': '0.1s',
      '@background-color-base': '#F0F4F6',
      '@background-color-light': '#F2F6F8',
      '@border-color-base': '#DCE3E6',
      '@border-color-split': '#E6EAEC',
      '@btn-padding-base': '0 15px',
      '@btn-padding-lg': '0 18px',
      '@card-inner-head-padding': '12px',
      '@card-padding-base': '15px',
      '@font-size-base': '12px',
      '@input-border-color': '#dbe4e6',
      '@input-height-base': '30px',
      '@input-placeholder-color': '#d0dadc',
      '@padding-md': '12px',
      '@primary-color': '#0095ff',
      '@table-padding-vertical': '8px',
      '@table-padding-horizontal': '8px',
      '@tabs-bar-margin': '0 0 12px 0',
      '@tabs-card-height': '36px',

      // button
      '@btn-border-radius-base': '4px',
      '@btn-border-radius-sm': '4px',
      '@btn-padding-horizontal-base': '16px',
      '@btn-height-base': '30px',
      // table
      '@table-header-bg': '#f7fafb',
      '@table-header-color': '#191919',
      '@table-row-hover-bg': '#eff5f8', // @background-color-light
      // button、input等的高度
      '@height-base': '30px',
      '@height-sm': '28px',
      '@breadcrumb-base-color': '#575757',
      '@breadcrumb-last-item-color': '#474747',
    },
    javascriptEnabled: true,
  };

  return lessOptions;
};
